<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  </head>
  <body>

    {% if data.student %}
    <h3>来自学生的反馈</h3>
    <table>
        <thead>
            <tr>
                <th>用户名</th>
                <th>联系方式</th>
                <th>留言日期</th>
                <th>内容</th>
            </tr>
        </thead>
        <tbody>
            {% for msg in data.student %}
            <tr>
                <td>{{ msg.username }}</td>
                <td>{{ msg.contact_phone }}</td>
                <td>{{ msg.created_at }}</td>
                <td>{{ msg.contents }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    {% endif %}

    {% if data.teacher %}
    <h3>来自教师/机构的反馈</h3>
    <table>
        <thead>
            <tr>
                <th>用户名</th>
                <th>联系方式</th>
                <th>留言日期</th>
                <th>内容</th>
            </tr>
        </thead>
        <tbody>
            {% for msg in data.teacher %}
            <tr>
                <td>{{ msg.username }}</td>
                <td>{{ msg.contact_phone }}</td>
                <td>{{ msg.created_at }}</td>
                <td>{{ msg.contents }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    {% endif %}

  </body>
</html>